package com.aldobucchi.x.mx.logging.Log
{
	import mx.logging.ILogger;
	import mx.logging.Log;
	
	import flash.utils.getQualifiedClassName;
	
	public class LogUtil
	{
		
		
		/**
		 * 
		 * Returns a logger following the simplest convention:
		 * For an object of class foo.bar.Clazz it will return a logger with category "foo.bar.Clazz"
		 * 
		 * @param instance
		 * @return 
		 * 
		 */		
		public static function getStandardLogger( instanceOrClass:Object ):ILogger
		{
			var category:String = getQualifiedClassName( instanceOrClass );
			category = category.split("::").join(".");
			return Log.getLogger( category );
		}
	}
}